/**
 * Requester.java
 * ************************** 
 * @date May 14, 2011
 * @author Michele Tamburini
 * 
 * **************************
 */
package infrastructureAPI;

import java.io.Serializable;
import java.net.InetAddress;

/**
 * Description: 
 * The CloudUser can submit requests to the cloud according to 
 * the API set provided by the infrastructure layer.
 * The current project is designed to run a private cloud,
 * so each request is supposed to come from a node belonging
 * to the cloud itself. The node, through which the request
 * passes from the infrastructure layer, becomes the "Requester node".
 * A Requester node has to expose:
 *  1) its address,
 *  2) the port through which contact the rmiregistry and 
 *  3) the name of the service registered in it.
 * Generally,
 * once the user has submitted the request using a script,
 * the script itself has to register its own service 
 * to the local rmiregistry, in order 
 * to receive an APIResponse.
 * The APIResponse indicates the collecting of the request
 * by a node or the 
 * accomplishment of the request. 
 *
 */
public interface Requester extends Serializable {
	
	/**
	 * Returns the InetAddress of the Requester node where
	 * the request has been submitted. 
	 * @return nodeAddress : InetAddress
	 */	
	public InetAddress getNodeAddress();
	
	/**
	 * Returns the port through which the local rmiregistry is listening
	 * for the communication.
	 * @return
	 */
	public Integer getPort();
	
	/**
	 * Return the service registered into the rmiregistry.
	 * The script which launched the request is supposed to register
	 * a service into the local rmiregistry in order
	 * to communicate with the back end of the cloud and retrive
	 * the answer to the request.
	 * @return
	 */
	public String getRegisteredService();

}
